#ifndef CNC_BASE_TOOL_DATA_IMPLEMENTATION_H
#define CNC_BASE_TOOL_DATA_IMPLEMENTATION_H

#include "tooldata.h"
#include <stdint.h>

namespace cnc {

	namespace base {

		class ToolDataImpl : public ToolData
		{
			Parameter *diameter_;
			Parameter *height_;
		public:
			ToolDataImpl() : diameter_(0), height_(0) {}
			void assignDiameter(Parameter *diameter)
			{
				diameter_ = diameter;
			}
			void assignHeight(Parameter *height)
			{
				height_ = height;
			}
			bool setDiameter(uint32_t diameter)
			{
				if (diameter_ == 0)
					return false;
				diameter_->set(diameter);
				return true;
			}
			bool setHeight(uint32_t height)
			{
				if (height_ == 0)
					return false;
				height_->set(height);
				return true;
			}
			bool getDiameter(uint32_t *diameter)
			{
				if (diameter_ == 0)
					return false;
				diameter_->get(diameter);
				return true;
			}
			bool getHeight(uint32_t *height)
			{
				if (height_ == 0)
					return false;
				height_->get(height);
				return true;
			}
		};

	} // namespace base

} // namespace cnc

#endif

